package com.samphanie.auiu.common.dto;

import com.samphanie.auiu.common.constants.AuiuConstants;
import lombok.*;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @author ZSY
 * @email 1451691457@qq.com
 */
@With
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserProfileDto {

    private Long id;

    @NotNull
    @Size(min = 1, max = 50)
    private String username;

    @NotNull
    @Size(min = 1, max = 50)
    private String nickname;

    private String avatar;

    @Pattern(regexp = AuiuConstants.PATTERN_MOBILE)
    @NotNull
    private String mobile;

    @NotNull
    @Size(min = 1)
    private String email;

    private List<RoleDto> roles;
}
